﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FolderToStringConverter.cs" company="Geologische Bundesanstalt">
//   Thomas Heuberger, 2014-02
// </copyright>
// <summary>
//   Defines the FolderToStringConverter type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace AttachmentHandler.Converters {
    using System;
    using System.Diagnostics;
    using System.Diagnostics.CodeAnalysis;
    using System.Globalization;
    using System.Windows.Data;

    using Outlook = Microsoft.Office.Interop.Outlook;

    /// <summary>
    /// The folder to string converter.
    /// </summary>
    public class FolderToStringConverter : IValueConverter {
        /// <summary>
        /// The convert.
        /// </summary>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <param name="targetType">
        /// The target type.
        /// </param>
        /// <param name="parameter">
        /// The parameter.
        /// </param>
        /// <param name="culture">
        /// The culture.
        /// </param>
        /// <returns>
        /// The <see cref="object"/>.
        /// </returns>
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
            if (value == null)
                return null;

            return (value as Outlook.Folder).FolderPath;
        }

        [SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed. Suppression is OK here. Not implemented anyways")]
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
            throw new NotImplementedException();
        }
    }
}
